
             
/**
 * 
 *
 * @File name:  BatchDeleteTFixedAssetsDetailAction.java   批量删除【资产详细信息:T_FIXED_ASSETS_DETAIL】
 * @Create on:  2011-11-01 08:49:453
 * @Author   :  许福辉
 *
 * @ChangeList
 * ---------------------------------------------------
 * Date         Editor              ChangeReasons
 *
 */
           
        
package com.boho.estates.usual.action;

            
import java.sql.Connection;
import java.util.Date;

import cn.boho.framework.actions.ActionImp;
import cn.boho.framework.context.ActionContext;
import cn.boho.framework.exception.UserOperationException;
import cn.boho.framework.po.POUtils;
import cn.boho.framework.service.MessageService;

import com.boho.common.SystemUtils;
import com.boho.common.Utils;
import com.boho.estates.po.TFixedAssetsDetailPO;
            
        

public class DeleteTFixedAssetsDetailAction extends ActionImp {
	private int id;
	private Connection con=null;
	@Override
	protected void doException(ActionContext atx, Exception ex) {
		if (!(ex instanceof UserOperationException)) {
			atx.setErrorContext("BOHO_COMMON_1003", MessageService.getMessage("BOHO_COMMON_1003"),"【资产详细信息】", ex);
		}
	}
	@Override
	protected int performExecute(ActionContext atx) throws Exception {
		String updateBy = SystemUtils.getSessionUser(atx);
				TFixedAssetsDetailPO tFixedAssetsDetailPO = new TFixedAssetsDetailPO();
				tFixedAssetsDetailPO.setId(id);
				TFixedAssetsDetailPO vtFixedAssetsDetailPO = new TFixedAssetsDetailPO();
				vtFixedAssetsDetailPO.setIsValid(0);
				vtFixedAssetsDetailPO.setUpdateBy(updateBy);
				vtFixedAssetsDetailPO.setUpdateDate(new java.util.Date());
				POUtils.update(con, tFixedAssetsDetailPO, vtFixedAssetsDetailPO,false);
				logger.info("删除操作：" + atx.getStringValue("SESSION_USER_NO") + "@"+ new Date(System.currentTimeMillis())+ "删除表：【资产详细信息:T_FIXED_ASSETS_DETAIL】 主键【"+ id + "】");
		return 1;
	}
	@Override
	protected int verifyParameters(ActionContext atx) throws Exception {
		con = atx.getConection();
		id = atx.getIntegerValue("BARCODE",-1);
		return 1;
	}
}
